package api.app;

import java.util.HashMap;
import org.json.JSONException;
import common.Host;
import common.Request;

/**
 * 实现帮忙医APP获取体检报告信息Reportquery接口
 * @author lipeng
 *
 */
public class Reportquery
{
	/**
	 *  实现帮忙医APPAPP获取体检报告信息reportquery接口调用
	 * @param parameter1      --卡号
	 * @param parameter2      --密码
	 * @param type            --类型
	 * @param useId           --userid
	 * @param isSearch          
	 * @param token           --token  
	 * @return
	 * @throws JSONException
	 * @throws Exception
	 */
    public static String get(String parameter1,String parameter2,String type,String useId,String isSearch,String token)throws JSONException,Exception{
    	//拼接口地址
    	String url = Host.getAddress()+"/api/reportquery";
    	
    	//给参数赋值 
    	HashMap<String, String> parmsTemp = new HashMap<>();
    	parmsTemp.put("parameter1", parameter1);
    	parmsTemp.put("parameter2", parameter2);
    	parmsTemp.put("type", type);
    	parmsTemp.put("useId", useId);
    	parmsTemp.put("isSearch", isSearch);
    	
    	
    	String result = Request.get(url, parmsTemp,token);
    	return result;
    }
    
    /**
     * 
     * @param studyid  
     * @param flag
     * @param token
     * @return
     * @throws JSONException
     * @throws Exception
     */
    public static String get(String studyid,String flag,String token)throws JSONException,Exception{
    	//拼接口地址
    	String url = Host.getAddress()+"/api/reportquery";
    	
    	//给参数赋值
    	HashMap<String, String> parmsTemp = new HashMap<>();
    	parmsTemp.put("studyid", studyid);
    	parmsTemp.put("flag", flag);
    	
    	String result = Request.get(url, parmsTemp,token);
    	return result;
    }
}
